import { ElMessage } from 'element-plus'

function success(text = "执行成功") {
    ElMessage.success({
        message: text,
        type: 'success'
    });
}

function warning(text = "警告") {
    ElMessage.warning({
        message: text,
        type: 'warning'
    });
}

function error(text) {
    ElMessage.error({
        message: text,
        type: 'error'
    });
}

function info(text) {
    ElMessage.info({
        message: text,
        type: 'info'
    });
}

export default {
    success,
    warning,
    error
}